export const FIELD_TYPE = {
  TEXT: 0,
  TEXTAREA: 1,
  RADIO: 2,
  CHECKBOX: 3,
  SELECT: 4,
  NUMBER: 5,
  FILE: 6,
  DATE: 7,
  RATE: 8,
  TABLE: 9,
  IMG: 10,
  FORMULA: 11,
  // SEARCH: 12,
  SIN_REFERENCE: 13,
  // MUL_REFERENCE: 14,
  // TITLE: 16
}
export const COMPONENT_TYPES = {
  input: 0,
  textarea: 1,
  radio: 2,
  checkbox: 3,
  select: 4,
  number: 5,
  'upload-file': 6,
  datetime: 7,
  rate: 8,
  'table-editor': 9,
  'image-uploader': 10,
  'formula': 11,
  tooltip: 15,
  text: 16,
  date: 17,
  month: 18,
  year: 19
}

export const FIELD = {
  [FIELD_TYPE.TEXT]: {
    label: '单行文本',
    value: FIELD_TYPE.TEXT
  },
  [FIELD_TYPE.TEXTAREA]: {
    label: '多行文本',
    value: FIELD_TYPE.TEXTAREA
  },
  [FIELD_TYPE.RADIO]: {
    label: '单选',
    value: FIELD_TYPE.RADIO
  },
  [FIELD_TYPE.CHECKBOX]: {
    label: '多选',
    value: FIELD_TYPE.CHECKBOX
  },
  [FIELD_TYPE.SELECT]: {
    label: '下拉框',
    value: FIELD_TYPE.SELECT
  },
  [FIELD_TYPE.NUMBER]: {
    label: '数值',
    value: FIELD_TYPE.NUMBER
  },
  [FIELD_TYPE.FILE]: {
    label: '附件',
    value: FIELD_TYPE.FILE
  },
  [FIELD_TYPE.DATE]: {
    label: '时间',
    value: FIELD_TYPE.DATE
  },
  // [FIELD_TYPE.RATE]: {
  //   label: '评分',
  //   value: FIELD_TYPE.RATE
  // },
  [FIELD_TYPE.TABLE]: {
    label: '表格',
    value: FIELD_TYPE.TABLE
  },
  [FIELD_TYPE.IMG]: {
    label: '图片',
    value: FIELD_TYPE.IMG
  },
  // [FIELD_TYPE.FORMULA]: {
  //   label: '公式',
  //   value: FIELD_TYPE.FORMULA
  // },
  // [FIELD_TYPE.SEARCH]: {
  //   label: '查找',
  //   value: FIELD_TYPE.SEARCH
  // },
  // [FIELD_TYPE.SIN_REFERENCE]: {
  //   label: '单项引用',
  //   value: FIELD_TYPE.SIN_REFERENCE
  // },
  // [FIELD_TYPE.MUL_REFERENCE]: {
  //   label: '多选引用',
  //   value: FIELD_TYPE.MUL_REFERENCE
  // }
  // [FIELD_TYPE.TITLE]: {
  //   label: '标题',
  //   value: FIELD_TYPE.TITLE
  // },
}

export const FIELD_OPTIONS = Object.values(FIELD)